<script setup lang="ts">
import { ref } from 'vue'
import lodash from 'lodash'

import axios from 'axios'
import { Girl } from '../data';
// 1. 在node_module/axios中，找到package.json
// 2. 在package.json中找到main字段对应的文件
//    node_modules\axios\lib\axios.js
// 3. 在引入.js文件的同时，会载入 types字段指定的 index.d.ts文件
//     此时就有了类型提示

// const arr = [1,2,3]
// arr.concat


const g1: Girl = {
  name: '',
  age: 1,
  say: () => {}
}
axios({
  url: 'xxxx',
  method: ""
})

defineProps<{ msg: string }>()

const count = ref(0)
</script>

<template>
  <h1>{{ msg }}</h1>

  <p>
    Recommended IDE setup:
    <a href="https://code.visualstudio.com/" target="_blank">VS Code</a>
    +
    <a href="https://github.com/johnsoncodehk/volar" target="_blank">Volar</a>
  </p>

  <p>See <code>README.md</code> for more information.</p>

  <p>
    <a href="https://vitejs.dev/guide/features.html" target="_blank">
      Vite Docs
    </a>
    |
    <a href="https://v3.vuejs.org/" target="_blank">Vue 3 Docs</a>
  </p>

  <button type="button" @click="count++">count is: {{ count }}</button>
  <p>
    Edit
    <code>components/HelloWorld.vue</code> to test hot module replacement.
  </p>
</template>

<style scoped>
a {
  color: #42b983;
}

label {
  margin: 0 0.5em;
  font-weight: bold;
}

code {
  background-color: #eee;
  padding: 2px 4px;
  border-radius: 4px;
  color: #304455;
}
</style>
